First, ensure we always consume floating values, as documented.
Second (and more serious), don't try to query the action if the
action name is not set yet. This will cause crashes...
return;
if (target_value && helper->target && g_variant_equal (target_value, helper->target))
- return;
+ {
+ g_variant_unref (g_variant_ref_sink (target_value));
+ return;
+ }
if (helper->target)
{
if (target_value)
helper->target = g_variant_ref_sink (target_value);
+ /* The action_name has not yet been set. Don't do anything yet. */
+ if (helper->action_name == NULL)
+ return;
+
was_enabled = helper->enabled;
was_active = helper->active;